#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void fbnq(int n,int a,int b)
{
	int i = 0;
		for (i = n; i > 0; i--)
		{
			int c = 0;
			c = b;
			b = a + b;
			a = c;
		}
		printf("%d", a);
}

int main()
{
	int a = 0;
	int b = 1;
	int n = 0;
	scanf("%d", &n);
	fbnq(n,a,b);
	return 0;
}